<?php

class Application_Form_Login extends Twitter_Bootstrap_Form_Vertical
{

    public function init()
    {
        $this->setIsArray(true)
             ->setElementsBelongTo('');       
        
        $this->setAction('/acesso/login')
             ->setName('formLogin')
             ->setAttrib('id', 'formLogin')
             ->setMethod('post');
        
        
        $this->addElement('text', 'cpf', array('label'      => 'CPF:',
                                               'required'   => true,
                                               'filters'    => array('Digits'),
                                               'class'      => 'span12'));

        $this->addElement('password', 'senha', array('label'        => 'Senha',
                                                     'required'     => true,
                                                     'filters'      => array('Digits'),
                                                     'class'        => 'span12'));
        
        $this->addElement('button', 'submit', array('label'     => 'Logar no Sistema',
                                                    'class'     => 'btn btn-primary btn-large',
                                                    'type'      => 'submit'
        ));

        $this->addElement('button', 'reset', array(
            'label'         => 'Limpar',
            'class'         => 'btn btn-danger',
            'type'          => 'reset'
        ));
        
        $this->addDisplayGroup(
            array('reset', 'submit'),
            'actions',
            array(
                'disableLoadDefaultDecorators' => true,
                'decorators' => array('Actions')
            )
        );
    }
    
}